Motor control system

ABSTRACT

A stepping motor control system according to the present invention includes a counting mechanism for counting the number of steps of the pulse train command, a latch mechanism for holding a counting value of the counting mechanism with a latch signal and finding a position command, a reference signal generating mechanism for generating the latch signal and a reference clock signal, a first calculating mechanism for calculating a pulse spacing of the pulse train command with the reference clock signal, and a second calculating mechanism for calculating a time interval from generation of the pulse train command to generation of the latch signal with the reference clock signal. In the stepping motor control system, the position command is corrected using command pulse spacing information calculated by the first calculating mechanism and time difference information calculated by the second calculating mechanism.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to a motor control system that carries outpositioning control according to the position command of a pulse trainand, more particularly, to a micro step control system for a steppingmotor.

2. Description of the Prior Art

In a conventional stepping motor control system, up-count or down-countof a pulse train command externally applied is carried out by an up/downcounter depending upon a rotational direction signal, data on anexcitation signal corresponding to a calculated value of the up/downcounter are stored in a ROM, the data stored in the ROM are convertedinto a voltage signal by a D/A converter, the voltage signal of the D/Aconverter is amplified by a drive amplifier, and a stepping motor isdriven. In this construction, it is possible to cause the stepping motorto be smoothly rotated by converting the data in the ROM into a falsesine wave and increasing the number of dividing of one period of thefalse sine wave.

In such a stepping motor control system, in order that the steppingmotor can be smoothly rotated, it is necessary to rapidly carry outprocessing from the generation of the false sine wave of the ROM to theoutputting of the voltage signal for driving the stepping motor, eachtime the pulse train command is generated. In a system that is comprisedof hardware such as a logic IC, an OP amplifier or the like, it ispossible to perform relatively high-speed processing. However, systemsthat are equipped with microcomputers or the like are increased at thepresent time for the purposes of realizing complex arithmetic operationand improving maintenance. In such a system equipped with amicrocomputer or the like, it is necessary to speed up the processing ofthe microcomputer or the like in order that a predetermined arithmeticoperation is performed each time the pulse train command is generatedand proper voltage is outputted to the stepping motor. There is aproblem that the cost of the entire system will raise. In addition,there are limitations of causing the processing by the microcomputer orthe like to be carried out at the high speeds, so that there is also aproblem that it is hard to carry out a precise control of the motor.

As a step to cope with the above-mentioned problems, there is employed asampling processing in which a processing speed of the microcomputer orthe like is realized at a predetermined cycle, in accordance withcounting the step number of the pulse train command at the predeterminedcycle according to the internal reference signal of the stepping motor(hereinafter referred to as “sampling processing”). However, in thiscase, irregular time difference is produced between the cycle of thesampling processing and the generating time of the pulse train commandapplied from the external and a change in the position command isgenerated during rotation, resulting in vibration of the rotation.

SUMMARY OF THE INVENTION

It is therefore an object of the present invention to provide a motorcontrol system that can cause a motor to be smoothly rotated.

In accordance with the present invention, there is provided a motorcontrol system for energizing a sine wave-like stairway currentaccording to a pulse train command impressed from an external. The motorcontrol system comprises a first counting means for counting the numberof steps of the pulse train command, a latch means for holding acounting value of the first counting means with a latch signal andfinding a position command, a reference signal generating means forgenerating the latch signal and a reference clock signal, a firstcalculating means for calculating a pulse spacing of the pulse traincommand with the reference clock signal, and a second calculating meansfor calculating a time interval of from generation of the pulse traincommand to generation of the latch signal with said reference clocksignal. The position command is corrected using command pulse spacinginformation calculated by the first calculating means and timedifference information calculated by the second calculating means.

In this motor control system, the correction of the position command iscarried out utilizing command pulse spacing information calculated bythe first calculating means and time difference information calculatedby the second calculating means, so that even if irregular timedifference is produced between a cycle of the sampling processing andthe generating time of the pulse train command applied from theexternal, it is possible to carry out stable sampling processing,without speeding up the processing speed of the microcomputer or thelike, and it is possible to cause the motor to be smoothly rotated.

BRIEF DESCRIPTION OF THE DRAWINGS

The above object and other objects and many of the attendant advantagesof the present invention will be readily appreciated as the same becomesbetter understood by reference to the following detailed descriptionwhen considered in connection with the accompanying drawings, in whichlike reference numerals denote the same parts throughout the Figures andwherein:

FIG. 1 is an explanatory view which is of assistance in explaining theprinciple of the present invention;

FIG. 2 is a view illustrating a stepping motor control system accordingto a first embodiment of the present invention;

FIG. 3 is a detail view particularly illustrating a part of the steppingmotor control system shown in FIG. 2;

FIG. 4 is an explanatory view which is of assistance in explaining theoperation of the stepping motor control system shown in FIGS. 2 and 3;

FIG. 5 is a view illustrating a stepping motor control system accordingto a second embodiment of the present invention;

FIG. 6 is a detail view particularly illustrating a part of the steppingmotor control system shown in FIG. 5; and

FIG. 7 is an explanatory view which is of assistance in explaining theoperation of the stepping motor control system shown in FIGS. 5 and 6.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1 is a view which is of assistance in explaining the principle ofthe present invention and illustrates a relationship between a pulsetrain command and a position command. In FIG. 1, (A) represents that aposition command at the time of a pulse train command P*(n) beingapplied is θ*(n), whereas (B) represents a case where the positioncommand is sampled with a sampling pulse t(n). (B) is shifted relativeto (A) by time T2(n). Therefore, it is conceivable that in a case wherea stepping motor is rotated at an average revolution of ω=θd/T1(n), theposition command is not θ*(n) but a value (C) that is further varied byΔθ(n), at the time when the position command is sampled with thesampling pulse t(n). That is, when the position command θ*(n) givenaccording to the pulse train command P*(n) is sampled with the samplingpulse t(n), an error of Δθ(n) is produced. The pulse train command P*(n) and the sampling pulse t(n) are asynchronous, so that Δθ(n) isvaried per sampling and vibration components are generated in thecommand.

Therefore, a correction value Δθ(n) of the position command is estimatedby, for example, the following equation (1) and the primary positioncommand θ*(n) is corrected with the correction value Δθ(n) on the basisof the following equation (2), whereby a position command θc(n) aftercorrected is found.Δθ(n)={T2(n)/T1(n)}θd  (1)θc(n)=θ*(n)+Δθ(n)  (2)Where, T1(n) is a counting value representing a spacing of the pulsetrain command P*(n), T2 (n) is a counting value representing a timeinterval of from the generation of the pulse train command P*(n) to thegeneration of the sampling pulse t(n) (latch signal), and θd is a stepangle per one pulse of the pulse train command externally applied.Further, n in the parentheses represents a value corresponding to thenth pulse train command P*(n). Where it is unnecessary to speciallyindicate the order of the pulse, (n) is omitted in the following.

Incidentally, for example, where a sampling pulse t(n)′ is producedprior to inputting of a pulse train command P*(n+1), T2(n)′ is used inlieu of T2(n) in the equation (1) and the sampling pulse is corrected toa condition indicated by (C′) in FIG. 1.

Referring now to FIG. 2, the stepping motor control system according tothe present invention will be discussed hereinafter. In FIG. 2,reference numeral 2 denotes a direction command entrance terminal,reference numeral 4 designates a pulse train command entrance terminal,reference numerals 8, 10 denote a first phase current command entranceterminal and a second phase current command entrance terminal,respectively, reference numeral 12 designates a counter for converting apulse train command P* into a position command θ*, reference numeral 14indicates a position command correcting device, reference numeral 16denotes a current command generating device, reference numeral 18designates a current control device, reference numeral 20 denotes aninverter, reference numerals 22, 24 denote a first phase currentdetecting device and a second phase current detecting device, andreference numeral 26 denotes a stepping motor.

The operation of the stepping motor control system shown in FIG. 2 willbe discussed hereinafter. A position command is externally applied in aform of a rotational direction to the direction command entranceterminal 2 and a position command is externally applied in a form of apulse train to the pulse train command entrance terminal 4. A rotationaldirection signal U/D and the pulse train command P* are converted into aposition command θ* by the counter 12. The step angle entrance terminal6 is an entrance terminal into which a signal to determine the number ofdividing of micro steps is inputted, and which sets a step angle θd thatis proportional to a rotation amount per 1 pulse. The position commandcorrecting device 14 receives the position command θ* and the step angleθd, and outputs a correction position command θ**. A concrete example ofa process for generating the correction position command θ** will bediscussed hereinafter. The current command generating device 16 receivescurrent amplitude commands Iαp*, Iβp* set in the current commandentrance terminals 8, 10 and the correction position command θ**, andoutputs current commands iα*, iβ*.

The current control device 18, the inverter 20 and the current detectingdevices 22, 24 constitute a current controlling means that controls theapplied voltage of the motor in such a manner that energization currentiαf, iβf for the stepping motor 26 coincides with the current commandsiα*, iβ*, and realizes the micro step driving.

Referring to FIG. 3, there is fully illustrated a part of the steppingmotor control system shown in FIG. 2. The counter 12 is comprised of anup/down counter 28 (a first counting means) for counting the step numberof the pulse train command P*, and a latch circuit 30 (a latch means)for holding a counting value of the up/down counter 28 with a latchsignal Ts. The up/down counter 28 carries out up-count or down-count ofthe number of steps of the pulse train command P* according to therotational direction signal U/D. The latch circuit 30 holds the countingvalue of the up/down counter 28 with a latch signal Ts (signal insynchronization with the sampling signal) that is generated in areference signal generating section 42, and converts the counting valueinto the position command θ* that is a binary number value, per apredetermined period.

The position command correcting device 14 is comprised of a timing pulsegenerating means 32, a counter 34, an adder 36, a latch circuit 38, alatch circuit 40, a reference signal generating means 42, a divider 44,a multiplier 46 and a sign switching means 48. The counter 34 and thelatch circuit 38 constitute a first calculating means. The counter 34and the latch circuit 40 constitute a second calculating means.

Referring now to FIG. 4, the operation of the position commandcorrecting device 14 will be discussed hereinafter. The reference signalgenerating means 42 generates a reference clock signal CKs and the latchsignal Ts as a control signal for the timing pulse generating means 32.The latch signal Ts is a signal that is obtained by carrying out thedivision of the reference clock signal CKs. The timing pulse generatingmeans 32 produces internal control timing signals pt1, pt2, pt3 throughflip-flops 50, 52, 54. The internal control timing signal pt1 is asignal that is obtained by sampling the pulse train command P* with thereference clock signal CKs. The internal control timing signal pt2 is asignal in which the internal control timing signal pt1 is delayed intime by one pulse of the reference clock signal CKs. The internalcontrol timing signal pt3 is a signal that becomes “L” ata rising-edgeof the internal control timing signal pt1 and returns to “H” at arising-edge of the latch signal Ts.

Immediately after the pulse train command P* is inputted, the counter 34is cleared at a rising-edge of the internal control timing signal pt2and then counts a period of time to the generation of a next internalcontrol timing signal pt2 by counting the reference clock signal CKs.

The latch circuit 38 holds the value of the counter 34 at the timing ofthe rising edge of the internal control timing signal pt1 immediatelybefore the counter 34 is cleared. Thus, the output T1 of the latchcircuit 38 (command pulse spacing information) is a value thatcorresponds to the time interval of the pulse train command P*.

The latch circuit 40 holds the value of the counter 34 at the timing ofthe rising-edge of the internal control timing signal pt3. Therising-edge of the internal control timing signal pt3 substantiallycoincides with the rising-edge of the latch signal Ts. The output T2 ofthe latch circuit 40 (time difference information) is a value thatcorresponds to a time of from the inputting of the pulse train commandP* to the generation of the latch signal Ts.

The divider 44 divides the output T2 of the latch circuit 40 by theoutput T1 of the latch circuit 38. The sign switching means 48 convertsthe output of the divider 44 into information with a sign thatcorresponds to the rotational direction signal. U/D, whereby thecorrection value Δθ is obtained. Incidentally, θd in the equation (1) isthe step angle per one pulse of the pulse train command P* and,therefore, corresponds to a minimum change amount of the latch circuit30. Thus, θd in the equation (1) for the correction value Δθ at the timewhen it is added to the position command θ* that is the output of thelatch circuit 30 amounts to 1, so that the output of the sign switchingmeans 48 corresponds to results that are obtained by carrying out thearithmetic operation of the equation (1).

A value that is obtained in the adder 36 by carrying out the addition ofthe position command θ* being the output of the latch circuit 30 and thecorrection value Δθ being the output of the sign switching means 48corresponds to a position command θc after corrected, that is resultsobtained by carrying out the arithmetic operation of the equation (2).The correction value Δθ is a digit lower than a minimum digit of theposition command θ*. The position command θc after corrected is a valuethat is obtained by linearly interpolating and extending a low order bitof the position command θ*.

The multiplier 46 carries out the multiplication of the position commandθc after corrected that is the output of the adder 36 and the step angleθd, and converts the position command θc after corrected into acorrection position command θ** that corresponds to the number ofdividing of the micro step. That is, the output of the position commandcorrecting device 14 is the input of the current command generatingdevice 16 and is used as address information for searching amplitudedata on a sine wave-like current command, so that, for example, when acomparison between a case where θd=1 and a case where θd=2 is made, achange in address per 1 pulse in the latter doubles that in the former.Therefore, revolution in the latter is made at a step angle that isdoubled relative to revolution in the former.

Incidentally, the latch signal Ts of the reference signal generatingdevice 42 is a signal that is obtained by dividing the reference clocksignal CKs. By causing the micro step control for the stepping motor tobe periodically carried out in synchronization with the latch signal Ts,there can be provided the motor control system in which vibrationcomponents associated with the sampling processing are decreased.

In the stepping motor control system according to the present invention,even if irregular time difference is produced between a cycle of thesampling processing and the generating time of the pulse train commandapplied from the external, error in the sampling of the position commandcan be reduced, so that fluctuation of the pulse train command P* issuppressed over a wide rotation range and stable sampling processing canbe realized. Therefore, it is possible to cause the stepping motor to besmoothly rotated, without speeding up the processing speed of themicrocomputer or the like.

Referring to FIG. 5, a stepping motor control system according to asecond embodiment of the present invention will be discussedhereinafter. In FIG. 5, reference numeral 60 denotes a direction commandentrance terminal, reference numeral 62 designates a pulse train commandentrance terminal, reference numeral 64 denotes a step angle entranceterminal, reference numeral 66 designates a counter for converting thepulse train command P* into the position command θ*, reference numeral68 denotes a position command correcting device, reference numeral 70denotes an adder, and reference numeral 72 designates a multiplier. Thedirection command entrance terminal 60, the pulse train command entranceterminal 62, the step angle entrance terminal 64, the counter 66, theposition command correcting device 68, the adder 70 and the multiplier72 constitute a correction position command arithmetic means 74.

The operation of the stepping motor control system shown in FIG. 5 willbe discussed hereinafter. The position command from the external isapplied in a form of a rotational direction and pulse train to thedirection command entrance terminal 60 and the pulse train commandentrance terminal 62. A rotational direction signal U/D and a pulsetrain command P* are converted into a position command θ* in the counter66. The step angle entrance terminal 64 is a terminal into which asignal for determining the number of dividing of micro steps isinputted, and which sets a step angle θd proportional to rotation amountper 1 pulse. The position command correcting device 68 receives therotational direction signal U/D and the pulse train command P* andoutputs a correction value Δθ. The adder 70 carries out the addition ofthe position command θ* and the correction value Δθ and finds a positioncommand θc after corrected. The multiplier 72 carries out themultiplication of the position command θc after corrected, and the stepangle θd proportional to the rotation amount per 1 pulse, and finds acorrection position command θ**. A concrete example of a process forproducing the correction position command θ** will be discussedhereinafter. The current command generating device 16 receives currentamplitude commands Iαp*, Iβp* set in the current command entranceterminals 8, 10 and the correction position command θ**, and outputscurrent commands iαp*, iβp*.

FIG. 6 is a detail view illustrating a part of the stepping motorcontrol system shown in FIG. 5. The counter 66 is comprised of anup/down counter 76 (a first counting means) for counting a step numberof the pulse train command P*, and a latch circuit 78 (a latch means)for holding the counting value of the up/down counter 76 with a latchsignal Ts. The up/down counter 76 carries out up-count or down-count ofthe number of steps of the pulse train command P* according to therotational direction signal U/D. The latch circuit 78 holds the countingvalue of the up/down counter 76 with a latch signal Ts (signal insynchronization with the sampling signal) that is generated in areference signal generating means 88, and converts the counting valueinto the position command θ* that is a binary number value, per apredetermined period.

The position command correcting device 68 is comprised of a timing pulsegenerating means 80, a counter 82 (a second counting means), a latchcircuit 84, a latch circuit 86, a reference signal generating means 88,a divider 90 and a sign switching section 92. The counter 82 and thelatch circuit 84 constitute a first calculating means. The counter 82and the latch circuit 86 constitute a second calculating means.

Referring now to FIG. 7, the operation of the position commandcorrecting device 68 will be discussed hereinafter. The reference signalgenerating means 88 generates a reference clock signal CKs and the latchsignal Ts as a control signal for the timing pulse generating means 80.The latch signal Ts is a signal that is obtained by carrying out thedivision of the reference clock signal CKs. The timing pulse generatingmeans 80 generates internal control timing signals pt1, pt2, pt3 throughflip-flops 94, 96, 98. The internal control timing signal pt1 is asignal that is obtained by sampling the pulse train command P* with thereference clock signal CKs. The internal control timing signal pt2 is asignal in which the internal control timing signal pt1 is delayed intime by one pulse of the reference clock signal CKs. The internalcontrol timing signal pt3 is a signal which becomes “H” with afalling-edge of the latch signal Ts and returns to “L” with arising-edge of the reference clock signal CKs.

Immediately after the pulse train command P* is inputted, the counter 82is cleared with a rising-edge of the internal control timing signal pt2and, thereafter, a period to generation of a next internal controltiming signal pt2 is determined by counting the reference clock signalCKs.

The latch circuit 84 holds the value of the counter 82 at the timing ofa rising-edge of the internal timing signal pt1 immediately before thecounter 82 is cleared. Thus, the output T1 of the latch circuit 84(command pulse interval information) amounts to a value that correspondsto a time interval of the pulse train command P*.

The latch circuit 86 holds a value of the counter 82 to the timing of arising-edge of the internal control timing signal pt3. A rising-edge ofthe internal control timing signal pt3 substantially coincides with thefalling-edge of the latch signal Ts. The output T2 of the latch circuit86 (time difference information) amounts to a value that corresponds toa time of from the inputting of the pulse train command P* to thegeneration of the latch signal Ts.

The divider 90 carries out the division of the output T2 of the latchcircuit 86 with the output T1 of the latch circuit 84. The signswitching means 92 converts the output of the divider 90 intoinformation with a sign, that corresponds to the rotational directionsignal U/D, thereby obtaining the correction value Δθ. The output of thesign switching means 92 corresponds to results that are obtained bycarrying out the arithmetic operation of the equation (1).

The counting value of the counter 82 is cleared by the rising-edge ofthe internal control timing signal pt2. However, when the stepping motoris brought to a stopped state, the pulse train command P* is notinputted, so that the internal control timing signal pt2 is left in Hstate. Therefore, the counting value of the counter 82 is not clearedand the counter 82 continues to count the reference clock signal CKs.Thus, the counting value of the counter 82 exceeds a predetermined valueand the counter 82 overflows and outputs an overflow signal OVFs. Whenthe overflow signal OVFs is inputted to the divider 90, the divider 90outputs zero, so that the correction value Δθ amounts to zero.Therefore, when the stepping motor is brought to the stopped condition,the correction value Δθ amounts to zero.

A value that is estimated in the adder 70 by addition of the positioncommand θ* being the output of the latch circuit 78 and the correctionvalue Δθ being the output of the sign switching means 92 corresponds tothe position command θc after corrected that is the results obtained bycarrying out the arithmetic operation of the equation (2).

The multiplier 72 carries out the multiplication of the position commandθc after corrected that is the output of the adder 70 and the step angleθd, and converts the position command θc into the correction positioncommand θ** corresponding to the number of dividing of the micro steps.That is, the output of the multiplier 72 is the input of the currentcommand generating device 16 and is used as address information forsearching amplitude data on the sine wave-like current command.

Incidentally, the latch signal Ts of the reference signal generatingdevice 88 is a signal that is obtained by dividing the reference clocksignal CKs. By causing the micro step control for the stepping motor tobe periodically carried out in synchronization with the latch signal Ts,there can be provided the motor control system in which vibrationcomponents associated with the sampling processing are decreased.

In the stepping motor control system according to the second embodimentof the present invention, even if irregular time difference is producedbetween a cycle of the sampling processing and the generating time ofthe pulse train command applied from the external, error in the samplingof the position command can be reduced, so that fluctuation of the pulsetrain command P* is suppressed over a wide rotation range and stablesampling processing can be realized. Therefore, it is possible to causethe stepping motor to be smoothly rotated, without speeding up theprocessing speed of the microcomputer or the like. Furthermore, when thestepping motor is brought to the stopped condition, the correction valueΔθ amounts to zero, so that the stepping motor is stopped at a locationcorresponding to a multiple of the step angle θd.

The present invention can be applied to a speed control system for astepping motor utilizing a pulse train as a command, a position controlsystem for an AC servomotor utilizing a pulse train as a command, and aspeed control system for the AC servomotor, in addition to a steppingmotor control system for the purpose of position-controlling.

Furthermore, while the case where the pulse train command is applied inthe form of the rotational direction and pulse train is described above,the pulse train command can be applied in another form such as a pulsetrain command according to a direction, and a second phase rectangularwave pulse train command.

Furthermore, while the present invention is applied to the motor controlsystem that carries out the control utilizing the microcomputer or thelike, the present invention can be also applied to all of controlsystems that carry out sampling processing with respect to signals thatare asynchronously inputted from the external.

Moreover, a control system that carries out sampling processing isequipped with a microcomputer or the like and often carries out softwareprocessing. The present invention can be applied not only to a softwareprocessing system but also to a control system comprised of hardware.

The terms and expressions that have been employed are used as terms ofdescription and not of limitation. There is no intention in the use ofsuch terms and expressions to exclude any equivalents of the featuresdescribed or any portions thereof. It is recognized, however, thatvarious modifications are possible within the scope of the inventionclaimed.

1. A motor control system for energizing a sine wave-like stairwaycurrent according to a pulse train command impressed from an external;said motor control system comprising: a first counting means forcounting the number of steps of said pulse train command; a latch meansfor holding a counting value of said first counting means with a latchsignal and finding a position command; a reference signal generatingmeans for generating said latch signal and a reference clock signal; afirst calculating means for calculating a pulse spacing of said pulsetrain command with said reference clock signal; and a second calculatingmeans for calculating a time interval of from generation of said pulsetrain command to generation of said latch signal with said referenceclock signal; wherein said position command is corrected using commandpulse spacing information calculated by said first calculating means andtime difference information calculated by said second calculating means.2. A motor control system according to claim 1, wherein said motorcontrol system is designed such that said motor control systemperiodically carries out micro step control for a stepping motorsynchronously with said latch signal.
 3. A motor control systemaccording to claim 1, wherein said motor control system is designed suchthat said motor control system causes a correction value of saidposition command to amount to zero at the time when a motor is stopped.4. A motor control system according to claim 3, wherein said motorcontrol system includes a second counting means for counting saidreference clock signal, clearing a counting value when said pulse traincommand is output, and outputting an overflow signal when said countingvalue exceeds a predetermined value, and wherein said motor controlsystem is designed such that said motor control system causes saidcorrection value to amount to zero when said overflow signal is output.